import pandas as pd



def getMap(filepath):
    print("开始读取excel,",filepath)

    df = pd.read_excel(filepath)

    # 文件的第一列数据
    df_l1=df.iloc[:, 0]

    df_l2=df.iloc[:, 1]
    m = {}
    for i in range(len(df_l1)):
        m.update({df_l1[i]:df_l2[i]})
    print(m)



if __name__ == '__main__':

    getMap(filepath='../数据测试集/读取excel两列转化成map结构.xls')